GXSpoolData
QuickDraw GX sends theGXSpoolData
message whenever a stream of data is about to be written to the spool file. You can override theGXSpoolData
message to modify data going into the spool file or to spool data in your own way. Your override of theGXSpoolData
message must match the following formal declaration:
OSErr MySpoolData (gxSpoolFile aSpoolFile, Ptr data, long *length);
aSpoolFile
- The spool file to which the data is written.
data
- A pointer to the buffer containing the data.
length
- On entry, the length of the buffer in bytes. On return, the actual number of bytes that were spooled.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
QuickDraw GX sends theGXSpoolData
message during spooling when a stream of data is about to be written to the spool file.One reason to override this message is to encrypt the data in the spool file. If you do change the data in the spool file with an override of the
GXSpoolData
message, you must do so prior to forwarding the message.The default implementation of the
GXSpoolData
message stores the data into the spool file. In most cases, you forward theGXSpoolData
message after making your data changes and let the default implementation write the data bytes.SPECIAL CONSIDERATIONS
You rarely send theGXSpoolData
message yourself.If you are providing your own spooling, you need to totally override the
GXSpoolData
message and all of the other spooling and despooling messages.If you are not providing your own spooling, you must forward the
GXSpoolData
message to allow the default implementation to write the data into the spool file.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help